Laptop and notebook sized personal computers have become increasingly popular. One problem with many existing laptop and notebook sized personal computers is that it is difficult to add peripherals to such systems since there are usually no internal expansion slots. Peripherals can be connected to external ports on laptop and notebook sized personal computers; however, the external peripherals hang off the side of the portable computer system thereby making the system no longer portable.
To provide a convenient interface for small peripheral devices, a computer industry consortium drafted a specification defining a standard interface for credit-card sized computer peripherals. The computer industry consortium is known as the Personal Computer Memory Card Industry Association (PCMCIA) and the standard credit-card sized peripherals are known as PCMCIA Cards. The first version of the PCMCIA specification (PCMCIA 1.0) created an interface that could handle memory card expansion as well as some simple peripherals such as card-sized modems. The second version of the PCMCIA specification (PCMCIA 2.0) is a full bus specification capable of handling most common types of computer peripherals, such as hard disk drives and LAN interfaces. (See PC Card Standard, Release 2.0, September 1991, Personal Computer Memory Card International Association.)
The PCMCIA standard is defined such that it is possible to plug in and remove cards while the base system is running, without damage to the cards or to the base system. This hot insertion/removal feature is unique to PCMCIA computer hardware. Furthermore, configuration information is kept in memory on a PCMCIA card itself, to allow the system to adapt to the card when it is plugged into a computer system. The PCMCIA standard defines the physical size and shape of PCMCIA cards. The PCMCIA standard also defines power and voltage levels, and connector pinouts. Cards that comply with the PCMCIA standard may be plugged into compatible systems without fear that the connectors won't match or that voltage differences will damage the hardware. The standard also defines the range of configuration information which may be kept on the cards, and indicates how software can read this information.
The PCMCIA hardware includes the socket into which the card is plugged, a connector for conveying power and information between the cards and the computer, and a socket adapter integrated circuit which couples the computer microprocessor to the sockets. The socket adapter contains hardware to generate microprocessor interrupts when a card hardware change event occurs such as a card being inserted or removed, or a card battery running low. Mapping hardware allows the card's memory, I/O, and interrupt to be directed to the proper places within the overall computer system. For example, if a card contains memory, the memory may be mapped such that it appears at any point in the computer's address space below 16 megabytes. Similarly, if a card can generate an interrupt request, the interrupt request can be routed to one of a number of system IRQ lines.
The current PCMCIA standard defines two layers of software that a computer system uses to access and manage PCMCIA cards. The two layers of software are called the Socket Services layer and the Card Services layer. In operation, applications which wish to use PCMCIA cards access the PCMCIA cards by using functions available from the Card Services layer. Applications which use the Card Services functions are known as Card Services "clients". A Card Services client registers with Card Services by calling a Card Services client registration function and providing some client information and the address of a client callback routine. Card Services executes the callback routine when a PCMCIA card related event occurs.
For example, when a hardware event from a PCMCIA card socket occurs, the client's callback routine performs processing associated with the event. Events include hardware events such as card insertion/removal or low battery and software events such as a client requesting exclusive use of a card. Upon card insertion, a registered client might use the callback routine to query the card to determine the card's type. If card was the correct type it would then proceed to configure the card. The card's onboard memory, I/O, and interrupt must be set up to fit the system into which the card has been plugged. Card Services functions enable clients to configure cards by programming the card hardware registers and the PCMCIA adapter.
The Socket Services and Card Services layers are designed such that a single system may have several instances of Socket Services (each instance of Socket Services serving one or more PCMCIA adapters), but only a single instance of Card Services. Clients of the Card Services layer see a number of PCMCIA sockets available but do not see a number of PCMCIA adapters, each of which has one or more sockets. This abstraction, and the configuration management support, are the primary reasons for the Card Services software layer.
In an IBM.RTM. compatible personal computer running the real mode DOS environment, the Socket Services software layer of the PCMCIA standard is usually implemented using a ROM, a device driver, or a Terminate and Stay Resident (TSR) program. Most implementations of the Socket Services layer only require about 3K of memory, a relatively small amount of memory.
In a real-mode DOS environment, the Card Services software layer is implemented using a device driver or a TSR program that is loaded after DOS has loaded. Since the Card Services software layer, as defined by the PCMCIA specification, must provide a large number of functions, the Card Services software layer usually requires more than 40K of memory. This relatively large amount of memory used for Card Services can present a problem in memory constrained DOS based computer systems.
The Microsoft.RTM. Windows.TM. operating environment is largely replacing the older DOS only environment in personal computers. The Microsoft.RTM. Windows.TM. environment provides an attractive graphical user interface (GUI) which makes application programs easier to use. The Microsoft.RTM. Windows.TM. operating environment supports DOS applications through the use of DOS virtual machines.
The Microsoft.RTM. Windows.TM. operating environment takes advantage of the extended memory available in computers based on the 386 or later microprocessors. To more efficiently use the computer system memory, protected mode implementations of Card Services that operate in the Windows.TM. operating environment have been proposed. (See "An Architecture for Implementing PCMCIA Card Services Under the Windows Operating System in Enhanced Mode", Ser. No. 08/041,705, filed Apr. 1, 1993.)
However, a protected mode implementation of Card Services may have compatibility problems with some real mode clients of Card Services. Specifically, some real mode clients of Card Services may require access to Card Services functions during the computer system boot procedure. Since the protected mode implementation of Card Services is not available until after the Microsoft.RTM. Windows.TM. operating environment is loaded, the real mode clients requiring Card Services during the computer system boot will not be able to access the Card Services functions they need.